package com.syh.jn.scm.infrastructure.repository.model.system;

import com.syh.core.ddd.infrastructure.repository.model.SuperModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Entity
//添加url唯一性约束
@Table(name = "T_SYSTEM_PERMISSION")
@EqualsAndHashCode(callSuper = true)
public class PermissionModel extends SuperModel {


  /**
   * 权限分类id
   */
  @Column(name = "TYPE_ID", columnDefinition = "bigint COMMENT '权限分类id'")
  private Long typeId;
  /**
   * 权限名称
   */
  @Column(name = "PERMISSION_NAME", columnDefinition = "varchar(50) COMMENT '权限名称'")
  private String permissionName;

  /**
   * url权限
   */
  @Column(name = "PERMISSION_URL", columnDefinition = "varchar(200) COMMENT 'URL访问权限'")
  private String permissionUrl;
  /**
   * method权限
   */
  @Column(name = "PERMISSION_METHOD", columnDefinition = "varchar(50) COMMENT 'method访问权限'")
  private String permissionMethod;
  /**
   * 所属终端系统:DOWNSTREAM,OPERATION,SUPPLIER,UPSTREAM
   */
  @Column(name = "TERMINAL_TYPE", columnDefinition = "varchar(50) COMMENT '所属终端'")
  private String terminalType;

	@Column(name = "DEL", columnDefinition = "smallint COMMENT '是否删除 1 否 -1 是 '")
	private Short del;
}
